package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.Staff;

public interface IStaffDAO_zjs extends CrudRepository<Staff, String> {
	//查询所有的操作人信息
	@Query("select new Staff(s.staffId,s.staffname) from Staff s")
	public List<Staff> findAllStaff();
	//根据id查询staff
	@Query("select new Staff(s.staffId,s.staffname) from Staff s where s.staffId=?1")
	public Staff findOneStaffById(String staffId);
}
